<%-- 
    Document   : purchaseDetailList
    Created on : 08/04/2009, 08:56:54 AM
    Author     : Joel Chuca
--%>

<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="packageDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='packageDetail.heading'/>"/>
    <meta name="menu" content="RolePurchaser"/>
</head>
<div id="help">
    <h2>
        <a href="<c:url value='helpPackageDetailList.html?decorate=false'/>"
           title="Ayuda Listado de Paquetes de Compra"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
            <fmt:message key="help"/>
        </a>
    </h2>
</div>

<c:set var="buttons">

    <c:if test="${purchaseDetail.packagesTotal != purchaseDetail.quantity}" >
        <input type="button" style="margin-right: 5px"
               onclick="location.href='<c:url value="/editPackageDetail.html"/>'"
               value="<fmt:message key="button.add"/>"/>
    </c:if>
    <input type="button" onclick="location.href='<c:url value="/purchaseDetails.html"/>'"
           value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />


<s:set name="packageDetailses" value="packageDetails" scope="request"/>
<div style="position:relative; left:400px">
    Saldo: ${saldo}
    <br>Total: ${total}
</div>
<br>
<display:table name="packageDetailses"  class="table" id="packageDetailForm" export="true" requestURI="" pagesize="25">
    <display:column titleKey="packageDetail" href="editPackageDetail.html" paramId="id" paramProperty="id">
        <fmt:message key="packageDetail.edit"/>
    </display:column>
    <display:column property="code" sortable="true" titleKey="packageDetail.code"/>
    <display:column property="packageName" sortable="true" titleKey="packageDetail.packageName"/>
    <display:column property="quantity" sortable="true" titleKey="packageDetail.quantity"/>
    <display:column titleKey="material.unitMeasure">
        <s:property value="material.unitMeasure.name"/>
    </display:column>
    <display:column property="stock" sortable="true" titleKey="packageDetail.stock"/>

    <display:setProperty name="paging.banner.some_items_found" value=""/>
    <display:setProperty name="paging.banner.all_items_found" value=""/>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("purchaseDetailForm");
</script>